home *** CD-ROM | disk | FTP | other *** search
- /* pieslice .c */
- /* Entered by A. Wayner */
-
- # include <graphics.h>
- char fillpattern[8] =
- { 0xf0, 0xf0, 0xf0, 0xf0, 0xf, 0xf, 0xf, 0xf };
-
- main()
- {
- int graphdriver = DETECT;
- int graphmode;
-
- /* Detect adapter type and */
- /* initialize graphics system */
- initgraph( &graphdriver, &graphmode, "\\turboc");
- outtextxy( 10, 10, "Demonstrating 'pieslice' ");
-
- /* Draw two slices of pie */
- setfillstyle( SLASH_FILL, RED );
- pieslice( 100, 100, 0, 45, 50 );
-
- setfillpattern( fillpattern, YELLOW );
- pieslice( 100, 100, 46, 360, 50 );
-
- outtextxy( 10, getmaxy() - 30,"Press any key to exit : ");
-
- getch(); /* Wait until a key is pressed */
- closegraph(); /* Exit graphics library */
-
- }